unit uInput;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TfInput = class(TForm)
    cmdOK: TBitBtn;
    cmdCancel: TBitBtn;
    lblInfo: TLabel;
    Edit1: TEdit;
    procedure FormShow(Sender: TObject);
    procedure Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fInput: TfInput;

implementation

uses uMain;

{$R *.dfm}

procedure TfInput.FormShow(Sender: TObject);
begin
  Self.Left := fMain.Left + ((fMain.Width div 2) - (Self.Width div 2));
  Self.Top := fMain.Top + ((fMain.Height div 2) - (Self.Height div 2));
end;

procedure TfInput.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if (Key = 13) then cmdOK.Click;
  if (Key = 27) then cmdCancel.Click;
end;

end.
